import request from "@/utils/request";

// 查询群众咨询列表
export function listConsultation(query) {
  return request({
    url: "/consult/listPage",
    method: "get",
    params: query,
  });
}

// 查询群众咨询统计
export function getConsultationStat(query) {
  return request({
    url: "/consult/manageStatistics",
    method: "get",
    params: query,
  });
}

// 导出群众咨询
export function exportConsultation(data) {
  return request({
    url: "/consult/exportConsultExcel",
    method: "post",
    data: data,
  });
}

// 删除群众咨询
export function delConsultation(Id) {
  return request({
    url: "/consult/delete/" + Id,
    method: "delete",
  });
}

// 更新状态
export function updateHandleStatus(data) {
  return request({
    url: "/consult/updateHandleStatus",
    method: "put",
    data: data,
  });
}

// 查询群众咨询个人统计-年度
export function getUserConsultationStat(query) {
  return request({
    url: "/police-statistics/consult",
    method: "get",
    params: query,
  });
}

// 查询群众咨询统计-年度排序图
export function getUserConsultationStatSort(query) {
  return request({
    url: "/police-statistics/consultCommunity",
    method: "get",
    params: query,
  });
}
